<?php
/**
 * Created by PhpStorm.
 * User: yandian
 * Date: 16/10/9
 * Time: 20:10
 */

namespace app\common\util;


class LogUtil
{
    private static function write($level, $content)
    {
        M('system_log')->add(['level' => $level, 'content' => $content, 'create_time' => DateTimeUtil::now()]);
    }

    public static function error($content)
    {
        self::write('error', $content);
    }

    public static function info($content)
    {
        self::write('info', $content);
    }

    public static function debug($content)
    {
        self::write('debug', $content);
    }

}